<?php 
	if (isset($_POST['CapNhatHoaDon']))
	{
		$MaHoaDon = $_REQUEST['MaHoaDon'];
		$MaThanhVien = $_REQUEST['MaThanhVien'];
		$DiaChiNhan = $_REQUEST['DiaChiNhan'];
		$SDTNhan = $_REQUEST['SDTNhan'];
		$HinhThucThanhToan =$_REQUEST['HinhThucThanhToan'];
		$NgayLap = $_REQUEST['NgayLap'];
		$GiaTriDonHang = $_REQUEST['GiaTriDonHang'];
		$TinhTrang = $_REQUEST['TinhTrang'];	
		
		include "connection.php";
		$sql="UPDATE hoadon SET MaThanhVien='".$MaThanhVien."', DiaChiNhan='".$DiaChiNhan."', SDTNhan='".$SDTNhan."', HinhThucThanhToan='".$HinhThucThanhToan."', NgayLap='".$NgayLap."', GiaTriDonHang='".$GiaTriDonHang."', TinhTrang='".$TinhTrang."'
		WHERE MaHoaDon='" .$MaHoaDon."'";
		
		if (!mysql_query($sql))
		{
			die('Error: ' . mysql_error());
		}
		header("location:../MyModel/TrangAD_qlhoadon.php");
		mysql_close($con);
	}
?>